package com.coffee.test.server;

import com.coffee.concurrent.CoffeeExecutorManager;
import com.coffee.netty.CoffeeRpcServer;
import com.coffee.netty.config.ServerProperties;
import com.coffee.netty.util.ExecutorManager;

/**
 * @author songkui
 * @since 2024/8/7 13:54
 */
public class ServerStart {
    public static void main(String[] args) {
//        ExecutorManager.getInstance().disruptor(8);

        ServerProperties serverProperties = new ServerProperties();
        serverProperties.setPort(8989);
        serverProperties.setHeartbeatSecond(300L);
//        serverProperties.setInetHost(host);

        CoffeeRpcServer rpcServer = new CoffeeRpcServer();
        rpcServer.registerRpcCodec(new HjCoder());
        rpcServer.registerCommandHandler(new HjServerHandler());
        rpcServer.start(serverProperties);
    }
}
